using System.Collections.Generic;
using UnityEngine;

[ExecuteInEditMode]
public class EditAllStep : MonoBehaviour
{
	public bool isrunflag;

	public List<editsteppos> allsteps;

	private editsteppos tempedit;

	private void Update()
	{
		if (isrunflag)
		{
			isrunflag = false;
			foreach (Transform item in base.transform)
			{
				tempedit = null;
				tempedit = item.gameObject.GetComponent<editsteppos>();
				if (tempedit != null && allsteps.IndexOf(tempedit) == -1)
				{
					allsteps.Add(tempedit);
				}
				UnityVersionUtil.SetActiveRecursive(item.transform.gameObject, state: true);
			}
			for (int i = 0; i < allsteps.Count; i++)
			{
				allsteps[i].isrunflag = true;
			}
		}
	}
}
